<script type="text/javascript">
    // increase the default animation speed to exaggerate the effect
           
    $(document).ready(function() {	
                 
        $('#tabla_index').dataTable({
            "sPaginationType": "full_numbers"        
                       
        });
                
    });
    
    
</script>
<table cellpadding="0" cellspacing="0" class="tabla " id="tabla_index" style="width: 95%">
    <thead>
        <tr>
            <th>Descripción</th>
            <th></th>
            <th></th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        <?php foreach ($obligations as $obligation): ?>
            <tr>

                <td><?php echo h($obligation['Obligation']['descripcion']); ?>&nbsp;</td>
                <td>
                    <?php echo $this->Ajax->link('editar', array('controller' => 'obligations', 'action' => 'edit', $obligation['Obligation']['id']), array('update' => 'content', 'Indicator' => 'loading')); ?>
                </td>
                <td>
                    <?php echo $this->Ajax->link('ver', array('controller' => 'obligations', 'action' => 'view', $obligation['Obligation']['id']), array('update' => 'content', 'Indicator' => 'loading')); ?>
                </td>
                <td>
                    <?php echo $this->Ajax->link('Eliminar', array('controller' => 'obligations', 'action' => 'delete', $obligation['Obligation']['id'], $obligation['Obligation']['contract_id']), array('update' => 'content', 'Indicator' => 'loading'), '¿Desea borrar el registro?'); ?>
                </td>


            </tr>
        <?php endforeach; ?>
    </tbody>
</table>

<p><?php echo $this->Ajax->link('Adicionar obligación ' . $this->Html->image("add.png", array('width' => '30', 'heigth' => '30', 'alt' => 'Adicionar obligación')), array('controller' => 'obligations', 'action' => 'add', $contract_id), array('update' => 'content', 'indicator' => 'loading', 'escape' => false)) ?></p>                  
<?php echo $this->Ajax->link($this->Html->image("regresar.gif", array('width' => '30', 'heigth' => '30', 'alt' => 'Adicionar usuario')), array('controller' => "Contracts", "action" => "index", $this->Session->read('contract_user')), array('update' => 'content', 'indicator' => 'loading', 'escape' => false), null) ?>
